[3.9] gh-99612: Fix PyUnicode_DecodeUTF8Stateful() for ASCII-only data (GH-99613...
authorSerhiy Storchaka <storchaka@gmail.com>
Tue, 22 Aug 2023 18:25:15 +0000 (21:25 +0300)
committerArnaud Rebillout <arnaudr@debian.org>
Tue, 14 Apr 2026 04:38:32 +0000 (11:38 +0700)
commit8ff96ba61327ffcfcf94d41fdf71aa59ef7efcd1
treead1332d50216e4425c91b33fbbdfa79acf19ea5b
parent17e129144bc5aed44441b5a593afb236ba3c08ad
[3.9] gh-99612: Fix PyUnicode_DecodeUTF8Stateful() for ASCII-only data (GH-99613) (GH-107224) (#107231)

Previously *consumed was not set in this case.
(cherry picked from commit f08e52ccb027f6f703302b8c1a82db9fd3934270).
(cherry picked from commit b8b3e6afc0a48c3cbb7c36d2f73e332edcd6058c)

Origin: upstream, https://github.com/python/cpython/commit/4a793281956db0e4a1ca5fdc5f3a0e91f331a75d

Gbp-Pq: Name CVE-2025-4516-5.patch
Lib/test/test_unicode.py
Misc/NEWS.d/next/C API/2022-11-20-09-52-50.gh-issue-99612.eBHksg.rst [new file with mode: 0644]
Modules/_testcapimodule.c
Objects/unicodeobject.c